feat(agent): implement Bedrock Converse API, model catalog, and desktop backend - #3704
Open
Chukwuebuka-2003 wants to merge 3 commits into
Open
feat(agent): implement Bedrock Converse API, model catalog, and desktop backend#3704Chukwuebuka-2003 wants to merge 3 commits into
Chukwuebuka-2003 wants to merge 3 commits into
Conversation
Signed-off-by: Chukwuebuka-2003 <ebulamicheal@gmail.com>
- Add sigv4.rs module with sign_request(), load_aws_credentials(), parse_bedrock_region() - Add http/aws-smithy-runtime-api dependencies - Add Provider::Bedrock match arms in llm.rs (placeholders returning errors) - Enable aws-sigv4 http1 feature for apply_to_request_http1x - All 6 SigV4 unit tests passing Signed-off-by: Chukwuebuka-2003 <ebulamicheal@gmail.com>
…op backend - Add post_bedrock() with SigV4-signed requests to the Converse API - Add bedrock_converse_body() and bedrock_converse_summary_body() builders - Add parse_bedrock_converse() with tool call and stop reason extraction - Wire Provider::Bedrock into complete() and summarize() paths - Create catalog_bedrock.rs with discover_bedrock_models() and 5 unit tests - Add Bedrock model discovery to desktop (agent_models.rs) for both saved and new agents - Add Bedrock credential requirements (AWS_ACCESS_KEY_ID, AWS_REGION) to readiness.rs - Fix build_token_source for Bedrock (SigV4, not bearer auth) Refs block#3614 Signed-off-by: Chukwuebuka-2003 <ebulamicheal@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implement the Bedrock Converse API integration, model catalog discovery, and desktop backend registration for the AWS Bedrock provider.
Refs #3614
Changes
Task 3: Bedrock Converse API in llm.rs
post_bedrock()— SigV4-signed POST to/model/{id}/converse, loads AWS creds from envbedrock_converse_body()— full Converse API body builder: messages, system prompt, toolConfig with toolSpec (text + image tool results)bedrock_converse_summary_body()— slim body for summarize pathparse_bedrock_converse()— extracts text, tool calls (toolUse blocks), stopReason mapping (end_turn/tool_use/max_tokens/content_filtered), usage tokenscomplete()andsummarize()match armsbuild_token_source()fixed — Bedrock now returns a no-op token source (SigV4 ≠ bearer auth)Task 4: Bedrock model catalog
catalog_bedrock.rswithdiscover_bedrock_models()— GETsListFoundationModelswith SigV4 signingparse_bedrock_model_list()— filters to ON_DEMAND + TEXT models, builds display names as "ModelName (Provider)"Task 5: Desktop backend (Tauri)
agent_models.rs: Addedis_bedrock_provider()anddiscover_bedrock_models()— readsAWS_REGION/AWS_DEFAULT_REGION, builds Config, callsdiscover_bedrock_models(). Wired into both saved-agent (get_agent_models) and new-agent (discover_agent_models) discovery chainsreadiness.rs: Added Bedrock credential requirements (AWS_ACCESS_KEY_ID,AWS_REGION) and model key (BEDROCK_MODEL)Testing